% ========================================================================================================================
% Schniepp Lab, 2018-2021
% Calculate the area of a certain sub peak
% ========================================================================================================================

function res=calArea(AGi,ALi,gammai,w0i,Li,startP,endP)
    fun=@(x,AG,AL,gamma,w0,L) GaussianLorenzNew(AG,AL,gamma,w0,L,x);
    res=integral(@(x)fun(x,AGi,ALi,gammai,w0i,Li),startP,endP);
end